home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / scott / WWW / NextStep / Implementation / old / Anchor.h next >
Text File  |  1992-11-25  |  2KB  |  59 lines

  1. /*    Hypertext "Anchor" Object                       Anchor.h
  2. **    ==========================
  3. **
  4. **    An anchor represents a region of a hypertext node which is linked
  5. **    to another anchor in the same or a different node.
  6. */
  7.  
  8. #import <objc/Object.h>
  9. #import <objc/List.h>
  10. #import <appkit/appkit.h>
  11.  
  12. //            Main definition of anchor:
  13. //            ========================== 
  14.  
  15. @interface Anchor:Object
  16. {
  17.     id        Node;        // The node within which this is an anchor
  18.                     /* (HyperText *) */
  19.                 // If not a subanchor
  20.     Anchor *    parent;        // If this is a subanchor
  21.     List *    children;    // If this has subanchors, these are they.
  22.        
  23. //    Information about this anchor:
  24.  
  25.     char *     Address;    // The address of this anchor
  26.  
  27. //    Generated locally, not archived:
  28.  
  29.     List *    Sources;    // A list of anchors pointing to this
  30.     id        DestAnchor;    // The anchor, if loaded, to which this leads
  31. }
  32.  
  33. + initialize;
  34. + setManager:aManager;        // Set class variable
  35.  
  36. + newAddress:(const char *)address;
  37. + newParent:(Anchor*)anAnchor tag:(const char *)tag;
  38.  
  39. +back;
  40. +next;
  41. +previous;
  42.  
  43. - (void)setNode:(id)node;
  44. - (const char *)address;
  45. - (char *)fullAddress;
  46. - setAddress: (const char *) ref_string;
  47. - select;            // Load if nec, select and bring to front
  48. - selectDiagnostic:(int)diag;    // Same with source display option
  49. - isLastChild;            // Move it in the list of children
  50. - (BOOL)follow;            // Follow  link if we can, return "can we?"
  51. - (void) linkTo:(Anchor *)destination;
  52. - node;                // Return the node in which the anchor sits
  53. - destination;            // Return the desination anchor
  54. - parent;            // Return the parent if any
  55. - unload;            // Make link dangle
  56. @end
  57.  
  58.  
  59.